<?php
/**
 * 员工管理验证器
 */

namespace app\common\validate;

class StaffValidate extends Validate
{
    protected $rule = [
            'name|姓名' => 'require',
    'position_id|职位' => 'require',
    'insure_id|社保关系' => 'require',
    'mobile|手机号' => 'require',
    'department_id|部门' => 'require',
    'id_card|身份证号' => 'require',
    ];

    protected $message = [
            'name.require' => '姓名不能为空',
    'position_id.require' => '职位不能为空',
    'insure_id.require' => '社保关系不能为空',
    'mobile.require' => '手机号不能为空',
    'department_id.require' => '部门不能为空',
    'id_card.require' => '身份证号不能为空',
    ];

    protected $scene = [
        'add'  => ['name','position_id','insurance','mobile','email','department_id','id_card',],
'edit' => ['name','position_id','insurance','mobile','email','department_id','id_card',],

    ];

    

}
